<extend name="Common@Layout:layui-admin"/>
<block name="title"><title>系统设置</title></block>
<block name="style">
<style>
.layui-main{padding:10px;}
.layui-form{padding-top:20px}
.layui-form-label{width:110px}
.layui-input-block{margin-left: 140px;width:300px;}
.layui-tab-title li{font-size:16px;}
</style>
</block>

<block name="main">
	<php>
		$map['key'] = 'SITE_OPTIONS';
		$m = M('Jsons');
		$siteOptions = $m->where($map)->field('json')->find();
		$siteOptions = json_decode($siteOptions['json'],true);
	</php>
	<div class="layui-main" style="width:auto">
			<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
				<ul class="layui-tab-title">
					<foreach name="siteOptions" item="vo" key="k" >
					<li <if condition="$k eq 'site_info'">class="layui-this"</if>>{$k}</li>
					</foreach>
				</ul>
				<div class="layui-tab-content">
					<foreach name="siteOptions" item="vo" key="k" >
					<div class="layui-tab-item <if condition="$k eq 'site_info'">layui-show</if>">
						<form class="layui-form" action="{:U('edit_post')}" method="post">
							<input type="hidden" name="group" value="{$k}">
							<foreach name="vo" item="co" key="ck">
							<div class="layui-form-item">
								<label class="layui-form-label">{$co}</label>
								<div class="layui-input-block">
									<input type="text" name="options[{$ck}]" value="{:F('Options/option_'.$k.'_'.$ck)}" placeholder="" autocomplete="off" class="layui-input">
								</div>
							</div>
							</foreach>
							<div class="layui-form-item">
								<div class="layui-input-block">
									<button class="layui-btn" key="set-mine" lay-filter="*" lay-submit="">提交</button>
								</div>
							</div>
						</form>
					</div>
					</foreach>
				</div>
			</div>    
	</div>
</block>


<block name="script">
<script>

</script>
</block>